package cn.com.idmy.auth.session;


import lombok.Data;
import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;

import java.util.function.Function;

@Slf4j
@Data
@Accessors(fluent = true)
public final class SessionStrategy<ID> {
    @NotNull
    private volatile Function<ID, Session<ID>> creator = Session::new;
    @NotNull
    private volatile Function<ID, ConcurrentStrategy> concurrent = id -> ConcurrentStrategy.ENABLED;
    @NotNull
    private volatile Function<ID, ShareStrategy> share = id -> ShareStrategy.DISABLED;
}
